<?php


//see:  http://192.168.33.10/CI/index.php/test/index
class Test extends CI_Controller {

	function Test(){
		parent::__construct();
	}

	function index(){
		$this->load->helper('form');
		$data['title'] = "首页";
		$data['headline'] = "录入用户信息";
		//多维数组
		$data['todo_list'] = array('Clean House', 'Call Mom', 'Run Errands');

		//$this->load->vars($data);
		//$this->load->model('mtest');
		
		
		//$data['query1'] = $this->mtest->get_last_ten_entries();
		
		$this->load->database();
		if ($this->db->simple_query("select * from j_user limit 1"))
		{
			echo "Success!";
		}
		else
		{
			echo "Query failed!";
		}
		$rs = $this->db->simple_query("select * from j_user limit 1");
		$result = $rs->fetchAll();
		print_r($result);
		
		// 载入视图
		//$this->load->view('users',$data);
		

	}
}